<!-- Modal -->
<div class="modal-dialog wide" style="width: 550px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if cwHb??>
                <#if cwHb.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="cwHbForm" method="post" action="${absoluteContextPath}/cw/cwHb/save">
            <#if cwHb??>
                <#if cwHb.id??>
                    <input type="hidden" name="id" value="${cwHb.id?c}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
            <div class="row">
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="id" value="${cwHb.id!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="DType" value="${cwHb.DType!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="ZType" value="${cwHb.ZType!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="XType" value="${cwHb.XType!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareA" value="${cwHb.spareA!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareB" value="${cwHb.spareB!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareC" value="${cwHb.spareC!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareD" value="${cwHb.spareD!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareE" value="${cwHb.spareE!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareF" value="${cwHb.spareF!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareG" value="${cwHb.spareG!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareH" value="${cwHb.spareH!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareI" value="${cwHb.spareI!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareJ" value="${cwHb.spareJ!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareK" value="${cwHb.spareK!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareL" value="${cwHb.spareL!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareM" value="${cwHb.spareM!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareN" value="${cwHb.spareN!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareO" value="${cwHb.spareO!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareP" value="${cwHb.spareP!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareQ" value="${cwHb.spareQ!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareR" value="${cwHb.spareR!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareS" value="${cwHb.spareS!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareT" value="${cwHb.spareT!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareU" value="${cwHb.spareU!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareV" value="${cwHb.spareV!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareW" value="${cwHb.spareW!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareX" value="${cwHb.spareX!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareY" value="${cwHb.spareY!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="spareZ" value="${cwHb.spareZ!''}" type="text" class="form-control"/>
                </div>
            </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "cwHbForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }
</script>